const { app, BrowserWindow } = require("electron");

const currentWindow = () => {
  const win = new BrowserWindow({
    width: 1000,
    height: 800,
    webPreferences: {
      //渲染进程使用 Node 模块
      //   nodeIntegration: true,
      //   contextIsolation: false,
    },
  });

  // win.loadURL('http://192.168.68.114:2889')
  win.loadFile("index.html");

  //打开开发者工具
  win.webContents.openDevTools();

  // 暂时关闭安全警告
  //   process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
};

app.whenReady().then(() => {
  currentWindow();
});
